<template>
	<view class="content">
		<image :src="imgSrc" mode="widthFix"></image>
		<!-- <view class="srcView"><rich-text :nodes="contentSrc"></rich-text></view> -->
		<view class="textView">
			<text>{{explainTxt}}</text>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			imgSrc: '',
			contentSrc: '',
			explainTxt: ''
		};
	},
	onLoad: function(option) {
		let id = Number(option.id);
		this.explainTxt = this.$config.NounsExplanation[id-2]
		this.imgSrc = "../../../static/image/data_" + id +'.png'
		if(id == 1)  this.explainTxt = this.$config.NounsExplanation[4]
		// switch (id) {
		// 	case '1':
		
		// 		this.contentSrc = '<div style="line-height: 25px; color: #000;"><p>血管年龄—内容来源：有来医生 原文链接:<br/>https://www.youlai.cn/yyk/article/6689.html</div>';
		// 		break;
		// 	case '2':
		// 		this.contentSrc = '<div style="line-height: 25px; color: #000;"><p>血管弹性—内容来源：有来医生 原文链接:<br/>https://www.youlai.cn/ask/4AFBEDmJTzM.html</div>';
		// 		break;
		// 	case '3':
		// 		this.contentSrc =
		// 			'<div style="line-height: 25px; color: #000;"><p>血流调节—内容来源：百度文库 原文链接:<br/>https://wenku.baidu.com/view/<br/>0a8384f70b4e767f5bcfceb5.html</div>';
		// 		break;
		// 	case '4':
		// 		this.contentSrc =
		// 			'<div style="line-height: 25px; color: #000;"><p>血流波动—内容来源：中国知网 原文链接:<br/>http://www.cnki.com.cn/Article/<br/>CJFDTotal-ZSWY200805002.html</div>';
		// 		break;
		// 	case '5':
		// 		this.contentSrc ='';
		// 		break;
		// }
	},
	methods: {}
};
</script>

<style>
page {
	background-color: #f5f5f5;
}
.content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100vw;
	height: auto;
	margin: 20rpx auto 90rpx;
}
.srcView {
	margin-bottom: 90rpx;
	width: 680rpx;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	font-size: 25rpx;
	color: #333333;
}
image {
	margin: 20rpx;
	width: 680rpx;
}
.textView {
	width: 650rpx;
}
</style>
